<?php

$tags = $db->fetchCol("SELECT name FROM cms_tags WHERE name LIKE ? AND site_id=? LIMIT 5", array($_GET['tag'] . '%', $site['id']));

if ($tags) {
	echo "<ul>";
	foreach($tags as $tag) {
		$tag = htmlentities($tag, ENT_COMPAT, 'UTF-8');
		$tag = preg_replace("/^(" . preg_quote($_GET['tag']) . ")/", "<span>$1</span>", $tag);
		echo "<li>", $tag, "</li>";
	}
	echo "</ul>";
}